// 练习一
let lastInStockFp = fp.flowRight(fp.prop('in_stock'), fp.last)

// 练习二
let firstCarName = fp.flowRight(fp.prop('name'), fp.first)

// 练习三
let _average = function(xs) {
  return fp.reduce(fp.add, 0, xs) / xs.length
}

let averageDollarValue = fp.flowRight(_average, fp.map(function(car){
  return car.dollar_value
}))

//练习四
let _underscore = fp.replace(/\W+/g, '_')

let _lowerCase = fp.flowRight(_underscore, fp.lowerCase)

let sanitizeNames = fp.map(function(i){
  return _lowerCase(i)
})